home *** CD-ROM | disk | FTP | other *** search
/ Interactive Quarterly / The Best of New Machine Publishing 1 - Disc 4: Interactive Quarterly.iso / pc / cafe / ultslots.dir / 00313_new spinproc.ls < prev    next >
Encoding:
Text File  |  1996-10-06  |  2.3 KB  |  69 lines

  1. on spinslot
  2.   puppetSprite(7, 1)
  3.   puppetSprite(8, 1)
  4.   puppetSprite(9, 1)
  5.   repeat with channel = 7 to 9
  6.     set spin to random(32)
  7.     repeat while spin > 0
  8.       set icon to random(7)
  9.       set the memberNum of sprite channel to icon
  10.       puppetSound(0)
  11.       puppetSound("SLOTBLIP.AIF")
  12.       updateStage()
  13.       startTimer()
  14.       repeat while the timer < 3
  15.         nothing()
  16.       end repeat
  17.       set spin to spin - 1
  18.     end repeat
  19.   end repeat
  20.   if (the memberNum of sprite 7 = 7) and (the memberNum of sprite 8 = 7) then
  21.     if the memberNum of sprite 9 = 7 then
  22.       go("WIN")
  23.     end if
  24.   else
  25.     if (the memberNum of sprite 7 = the memberNum of sprite 8) and (the memberNum of sprite 8 = the memberNum of sprite 9) then
  26.       go("WIN")
  27.     else
  28.       if (the memberNum of sprite 7 = 7) and (the memberNum of sprite 8 = the memberNum of sprite 9) then
  29.         go("WIN")
  30.       else
  31.         if (the memberNum of sprite 8 = 7) and (the memberNum of sprite 7 = the memberNum of sprite 9) then
  32.           go("WIN")
  33.         else
  34.           if (the memberNum of sprite 9 = 7) and (the memberNum of sprite 7 = the memberNum of sprite 8) then
  35.             go("WIN")
  36.           else
  37.             if (the memberNum of sprite 7 = 7) and (the memberNum of sprite 8 = 7) then
  38.               go("WIN")
  39.             else
  40.               if (the memberNum of sprite 7 = 7) and (the memberNum of sprite 9 = 7) then
  41.                 go("WIN")
  42.               else
  43.                 if (the memberNum of sprite 8 = 7) and (the memberNum of sprite 9 = 7) then
  44.                   go("WIN")
  45.                 else
  46.                   if (the memberNum of sprite 7 = 6) and (the memberNum of sprite 8 = 6) then
  47.                     go("WIN")
  48.                   else
  49.                     if (the memberNum of sprite 8 = 6) and (the memberNum of sprite 9 = 6) then
  50.                       go("WIN")
  51.                     else
  52.                       if (the memberNum of sprite 7 = 6) and (the memberNum of sprite 9 = 6) then
  53.                         go("WIN")
  54.                       else
  55.                         put "Sorry... try again..." into field "Credits"
  56.                         go("SLOT2")
  57.                       end if
  58.                     end if
  59.                   end if
  60.                 end if
  61.               end if
  62.             end if
  63.           end if
  64.         end if
  65.       end if
  66.     end if
  67.   end if
  68. end
  69.